cmake_minimum_required(VERSION 3.14.1)
project(Ascend310Infer[CXX])
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -std=c++17 -Werror -Wall -fPIE -Wl,--allow-shlib-undefined")
set(PROJECT_SRC_ROOT ${CMAKE_CURRENT_LIST_DIR}/)
option(MINDSPORE_PATH "mindspore install path" "/home/miniconda/envs/fcos/lib/python3.7/site-packages/mindspore")
include_directories(${MINDSPORE_PATH})
include_directories(${MINDSPORE_PATH}/include)
include_directories(${PROJECT_SRC_ROOT}/../inc)
find_package(gflags REQUIRED)
find_library(MS_LIB libmindspore.so ${MINDSPORE_PATH}/lib)
find_library(gflags libgflags.so.2.2.2 /home/pkg/gflags-2.2.2/build/CMakeFiles/CMakeRelink.dir)
file(GLOB_RECURSE MD_LIB ${MINDSPORE_PATH}/_c_dataengine*)
add_executable(i3d main.cc utils.cc)
target_link_libraries(i3d ${MS_LIB} ${MD_LIB} gflags)
